package top.zimang.yorn.activity;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class ActCollector {
    public static List<BaseActivity> activities = new ArrayList();

    public ActCollector() {
    }

    public static void addAct(BaseActivity activity) {
        activities.add(activity);
    }

    public static void remove(BaseActivity activity) {
        activities.remove(activity);
    }

    public static void finishAll() {
        Iterator var0 = activities.iterator();

        while(((Iterator<?>) var0).hasNext()) {
            BaseActivity activity = (BaseActivity)var0.next();
            if (!activity.isFinishing()) {
                activity.finish();
            }
        }

    }
}
